package com.song.activiti;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Deployment;

public class MainTest {
    public static void main(String[] args) {
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        RepositoryService repositoryService = processEngine.getRepositoryService();
        Deployment deployment = repositoryService.createDeployment()
                .addClasspathResource("activities/test.bpmn20.xml")
                .name("测试流程")
                .deploy();
        System.out.println("流程id: " + deployment.getId());
        System.out.println("流程名称: " + deployment.getName());
    }
}
